package com.ruoyi.system.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysCjWorkOrderBiMapper;
import com.ruoyi.system.domain.SysCjWorkOrderBi;
import com.ruoyi.system.service.ISysCjWorkOrderBiService;

/**
 * SysCjWorkOrderBiService业务层处理
 * 
 * @author SYF
 * @date 2025-06-04
 */
@Service
public class SysCjWorkOrderBiServiceImpl implements ISysCjWorkOrderBiService 
{
    @Autowired
    private SysCjWorkOrderBiMapper sysCjWorkOrderBiMapper;

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public SysCjWorkOrderBi selectSysCjWorkOrderBiByYear(String id)
    {
        return sysCjWorkOrderBiMapper.selectSysCjWorkOrderBiByYear(id);
    }

    /**
     * 查询SysCjWorkOrderBi列表
     * 
     * @param sysCjWorkOrderBi SysCjWorkOrderBi
     * @return SysCjWorkOrderBi
     */
    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<SysCjWorkOrderBi> selectSysCjWorkOrderBiList(SysCjWorkOrderBi sysCjWorkOrderBi)
    {
        return sysCjWorkOrderBiMapper.selectSysCjWorkOrderBiList(sysCjWorkOrderBi);
    }

    /**
     * 新增SysCjWorkOrderBi
     * 
     * @param sysCjWorkOrderBi SysCjWorkOrderBi
     * @return 结果
     */
    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public int insertSysCjWorkOrderBi(SysCjWorkOrderBi sysCjWorkOrderBi)
    {
        return sysCjWorkOrderBiMapper.insertSysCjWorkOrderBi(sysCjWorkOrderBi);
    }

    /**
     * 修改SysCjWorkOrderBi
     * 
     * @param sysCjWorkOrderBi SysCjWorkOrderBi
     * @return 结果
     */
    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public int updateSysCjWorkOrderBi(SysCjWorkOrderBi sysCjWorkOrderBi)
    {
        return sysCjWorkOrderBiMapper.updateSysCjWorkOrderBi(sysCjWorkOrderBi);
    }

    /**
     * 批量删除SysCjWorkOrderBi
     * 
     * @param years 需要删除的SysCjWorkOrderBi主键
     * @return 结果
     */
    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public int deleteSysCjWorkOrderBiByYears(String[] years) {
        return sysCjWorkOrderBiMapper.deleteSysCjWorkOrderBiByYears(years);
    }

    /**
     * 删除SysCjWorkOrderBi信息
     * 
     * @param year SysCjWorkOrderBi主键
     * @return 结果
     */
    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public int deleteSysCjWorkOrderBiByYear(String year)
    {
        return sysCjWorkOrderBiMapper.deleteSysCjWorkOrderBiByYear(year);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<Map<String,Object>> listCjshSummary() {
        return sysCjWorkOrderBiMapper.listCjshSummary();
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<Map<String,Object>> selectCjshOrdersInfo() {
        return sysCjWorkOrderBiMapper.selectCjshOrdersInfo();
    }
}
